using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
namespace SRW.SetInfo
{
   class SetWtanswer
   {
      public static SqlCommand Set_Wtanswer_Data(SqlCommand cmd, Wtanswer mWtanswer,bool CheckPk)
      {
         
         if (!(string.IsNullOrEmpty(mWtanswer.pkID.ToString())))
         {
            if (CheckPk)
               cmd.Parameters.AddWithValue("@pkID", mWtanswer.pkID);
         }
         if (!(string.IsNullOrEmpty(mWtanswer.wtanname.ToString())))
         {
         cmd.Parameters.AddWithValue("@wtanname", mWtanswer.wtanname);
         }
         if (!(string.IsNullOrEmpty(mWtanswer.problemID.ToString())))
         {
         cmd.Parameters.AddWithValue("@problemID", mWtanswer.problemID);
         }
         return cmd;
      }
   }
}
